package com.av.android;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

/**
 * @author mwho
 * 
 */
public class ViewReportActivity extends TabActivity {

	private TabHost mTabHost;
	public Report report;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_member);
		
		report = (Report) getIntent().getExtras().getSerializable("report");
		mTabHost = getTabHost();
		TabSpec firstTabSpec = mTabHost.newTabSpec("tid1");
		TabSpec secondTabSpec = mTabHost.newTabSpec("tid2");

		firstTabSpec.setIndicator("Report details").setContent(
				new Intent(this, ReportDetailActivity.class).putExtra("report", report));
		secondTabSpec.setIndicator("View map").setContent(
				new Intent(this, MapsActivity.class).putExtra("report", report));

		mTabHost.addTab(firstTabSpec);
		mTabHost.addTab(secondTabSpec);
	}
}
